import { HIDE_MENU_LIST, SET_MENU_LIST_VISIBLE, SHOW_MENU_LIST } from '../constant';

export const setMenuListVisible = (data) => ({ type: SET_MENU_LIST_VISIBLE, data })

export const showMenuList = () => ({ type: SHOW_MENU_LIST });

export const hideMenuList = () => ({ type: HIDE_MENU_LIST });

export const toggleMenuListVisible = () => (dispatch, getState) => {
  let menuListVisible = getState().menuListVisible
  dispatch(setMenuListVisible(!menuListVisible))
}
